Integrand size = 43, antiderivative size = 320 \[ \int \frac {(c+d \tan (e+f x)) \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx=\frac {\left (a^3 (A c-c C-B d)-3 a b^2 (A c-c C-B d)+3 a^2 b (B c+(A-C) d)-b^3 (B c+(A-C) d)\right ) x}{\left (a^2+b^2\right )^3}+\frac {\left (3 a^2 b (A c-c C-B d)-b^3 (A c-c C-B d)-a^3 (B c+(A-C) d)+3 a b^2 (B c+(A-C) d)\right ) \log (a \cos (e+f x)+b \sin (e+f x))}{\left (a^2+b^2\right )^3 f}-\frac {\left (A b^2-a (b B-a C)\right ) (b c-a d)}{2 b^2 \left (a^2+b^2\right ) f (a+b \tan (e+f x))^2}-\frac {a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)}{b^2 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))} \]
[Out]
Time = 0.77 (sec) , antiderivative size = 320, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.093, Rules used = {3716, 3709, 3612, 3611} \[ \int \frac {(c+d \tan (e+f x)) \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx=-\frac {(b c-a d) \left (A b^2-a (b B-a C)\right )}{2 b^2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}-\frac {a^4 C d-a^2 b^2 (d (A-3 C)+B c)+2 a b^3 (A c-B d-c C)+b^4 (A d+B c)}{b^2 f \left (a^2+b^2\right )^2 (a+b \tan (e+f x))}+\frac {\left (-\left (a^3 (d (A-C)+B c)\right )+3 a^2 b (A c-B d-c C)+3 a b^2 (d (A-C)+B c)-b^3 (A c-B d-c C)\right ) \log (a \cos (e+f x)+b \sin (e+f x))}{f \left (a^2+b^2\right )^3}+\frac {x \left (a^3 (A c-B d-c C)+3 a^2 b (d (A-C)+B c)-3 a b^2 (A c-B d-c C)-b^3 (d (A-C)+B c)\right )}{\left (a^2+b^2\right )^3} \]
[In]
[Out]
Rule 3611
Rule 3612
Rule 3709
Rule 3716
Rubi steps \begin{align*} \text {integral}& = -\frac {\left (A b^2-a (b B-a C)\right ) (b c-a d)}{2 b^2 \left (a^2+b^2\right ) f (a+b \tan (e+f x))^2}+\frac {\int \frac {a^2 C d+b^2 (B c+A d)+a b (A c-c C-B d)-b (A b c-a B c-b c C-a A d-b B d+a C d) \tan (e+f x)+\left (a^2+b^2\right ) C d \tan ^2(e+f x)}{(a+b \tan (e+f x))^2} \, dx}{b \left (a^2+b^2\right )} \\ & = -\frac {\left (A b^2-a (b B-a C)\right ) (b c-a d)}{2 b^2 \left (a^2+b^2\right ) f (a+b \tan (e+f x))^2}-\frac {a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)}{b^2 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))}+\frac {\int \frac {b \left (a^2 (A c-c C-B d)-b^2 (A c-c C-B d)+2 a b (B c+(A-C) d)\right )-b \left (2 a b (A c-c C-B d)-a^2 (B c+(A-C) d)+b^2 (B c+(A-C) d)\right ) \tan (e+f x)}{a+b \tan (e+f x)} \, dx}{b \left (a^2+b^2\right )^2} \\ & = \frac {\left (a^3 (A c-c C-B d)-3 a b^2 (A c-c C-B d)+3 a^2 b (B c+(A-C) d)-b^3 (B c+(A-C) d)\right ) x}{\left (a^2+b^2\right )^3}-\frac {\left (A b^2-a (b B-a C)\right ) (b c-a d)}{2 b^2 \left (a^2+b^2\right ) f (a+b \tan (e+f x))^2}-\frac {a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)}{b^2 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))}+\frac {\left (3 a^2 b (A c-c C-B d)-b^3 (A c-c C-B d)-a^3 (B c+(A-C) d)+3 a b^2 (B c+(A-C) d)\right ) \int \frac {b-a \tan (e+f x)}{a+b \tan (e+f x)} \, dx}{\left (a^2+b^2\right )^3} \\ & = \frac {\left (a^3 (A c-c C-B d)-3 a b^2 (A c-c C-B d)+3 a^2 b (B c+(A-C) d)-b^3 (B c+(A-C) d)\right ) x}{\left (a^2+b^2\right )^3}+\frac {\left (3 a^2 b (A c-c C-B d)-b^3 (A c-c C-B d)-a^3 (B c+(A-C) d)+3 a b^2 (B c+(A-C) d)\right ) \log (a \cos (e+f x)+b \sin (e+f x))}{\left (a^2+b^2\right )^3 f}-\frac {\left (A b^2-a (b B-a C)\right ) (b c-a d)}{2 b^2 \left (a^2+b^2\right ) f (a+b \tan (e+f x))^2}-\frac {a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)}{b^2 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))} \\ \end{align*}
Result contains complex when optimal does not.
Time = 6.34 (sec) , antiderivative size = 379, normalized size of antiderivative = 1.18 \[ \int \frac {(c+d \tan (e+f x)) \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx=-\frac {C (c+d \tan (e+f x))}{b f (a+b \tan (e+f x))^2}-\frac {-\frac {b c C-b B d-a C d}{2 b f (a+b \tan (e+f x))^2}+\frac {\frac {\left (-2 b^3 (A c-c C-B d)+2 a b^2 (B c+(A-C) d)\right ) \left (-\frac {\log (i-\tan (e+f x))}{2 (i a-b)^3}+\frac {\log (i+\tan (e+f x))}{2 (i a+b)^3}+\frac {b \left (3 a^2-b^2\right ) \log (a+b \tan (e+f x))}{\left (a^2+b^2\right )^3}-\frac {b}{2 \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}-\frac {2 a b}{\left (a^2+b^2\right )^2 (a+b \tan (e+f x))}\right )}{b}-2 b (B c+(A-C) d) \left (-\frac {i \log (i-\tan (e+f x))}{2 (a+i b)^2}+\frac {i \log (i+\tan (e+f x))}{2 (a-i b)^2}+\frac {2 a b \log (a+b \tan (e+f x))}{\left (a^2+b^2\right )^2}-\frac {b}{\left (a^2+b^2\right ) (a+b \tan (e+f x))}\right )}{2 b f}}{b} \]
[In]
[Out]
Time = 0.20 (sec) , antiderivative size = 494, normalized size of antiderivative = 1.54
method | result | size |
derivativedivides | \(\frac {-\frac {-A a \,b^{2} d +A \,b^{3} c +B \,a^{2} b d -B a \,b^{2} c -a^{3} C d +C \,a^{2} b c}{2 b^{2} \left (a^{2}+b^{2}\right ) \left (a +b \tan \left (f x +e \right )\right )^{2}}-\frac {-A \,a^{2} b^{2} d +2 A a \,b^{3} c +A \,b^{4} d -B \,a^{2} b^{2} c -2 B a \,b^{3} d +B \,b^{4} c +a^{4} C d +3 C \,a^{2} b^{2} d -2 C a \,b^{3} c}{\left (a^{2}+b^{2}\right )^{2} b^{2} \left (a +b \tan \left (f x +e \right )\right )}-\frac {\left (A \,a^{3} d -3 A \,a^{2} b c -3 A a \,b^{2} d +A \,b^{3} c +B \,a^{3} c +3 B \,a^{2} b d -3 B a \,b^{2} c -B \,b^{3} d -a^{3} C d +3 C \,a^{2} b c +3 C a \,b^{2} d -C \,b^{3} c \right ) \ln \left (a +b \tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right )^{3}}+\frac {\frac {\left (A \,a^{3} d -3 A \,a^{2} b c -3 A a \,b^{2} d +A \,b^{3} c +B \,a^{3} c +3 B \,a^{2} b d -3 B a \,b^{2} c -B \,b^{3} d -a^{3} C d +3 C \,a^{2} b c +3 C a \,b^{2} d -C \,b^{3} c \right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}+\left (A \,a^{3} c +3 A \,a^{2} b d -3 A a \,b^{2} c -A \,b^{3} d -B \,a^{3} d +3 B \,a^{2} b c +3 B a \,b^{2} d -B \,b^{3} c -C \,a^{3} c -3 C \,a^{2} b d +3 C a \,b^{2} c +C \,b^{3} d \right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right )^{3}}}{f}\) | \(494\) |
default | \(\frac {-\frac {-A a \,b^{2} d +A \,b^{3} c +B \,a^{2} b d -B a \,b^{2} c -a^{3} C d +C \,a^{2} b c}{2 b^{2} \left (a^{2}+b^{2}\right ) \left (a +b \tan \left (f x +e \right )\right )^{2}}-\frac {-A \,a^{2} b^{2} d +2 A a \,b^{3} c +A \,b^{4} d -B \,a^{2} b^{2} c -2 B a \,b^{3} d +B \,b^{4} c +a^{4} C d +3 C \,a^{2} b^{2} d -2 C a \,b^{3} c}{\left (a^{2}+b^{2}\right )^{2} b^{2} \left (a +b \tan \left (f x +e \right )\right )}-\frac {\left (A \,a^{3} d -3 A \,a^{2} b c -3 A a \,b^{2} d +A \,b^{3} c +B \,a^{3} c +3 B \,a^{2} b d -3 B a \,b^{2} c -B \,b^{3} d -a^{3} C d +3 C \,a^{2} b c +3 C a \,b^{2} d -C \,b^{3} c \right ) \ln \left (a +b \tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right )^{3}}+\frac {\frac {\left (A \,a^{3} d -3 A \,a^{2} b c -3 A a \,b^{2} d +A \,b^{3} c +B \,a^{3} c +3 B \,a^{2} b d -3 B a \,b^{2} c -B \,b^{3} d -a^{3} C d +3 C \,a^{2} b c +3 C a \,b^{2} d -C \,b^{3} c \right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}+\left (A \,a^{3} c +3 A \,a^{2} b d -3 A a \,b^{2} c -A \,b^{3} d -B \,a^{3} d +3 B \,a^{2} b c +3 B a \,b^{2} d -B \,b^{3} c -C \,a^{3} c -3 C \,a^{2} b d +3 C a \,b^{2} c +C \,b^{3} d \right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right )^{3}}}{f}\) | \(494\) |
norman | \(\frac {\frac {\left (A \,a^{2} b^{2} d -2 A a \,b^{3} c -A \,b^{4} d +B \,a^{2} b^{2} c +2 B a \,b^{3} d -B \,b^{4} c -a^{4} C d -3 C \,a^{2} b^{2} d +2 C a \,b^{3} c \right ) \tan \left (f x +e \right )}{f b \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}+\frac {\left (A \,a^{3} c +3 A \,a^{2} b d -3 A a \,b^{2} c -A \,b^{3} d -B \,a^{3} d +3 B \,a^{2} b c +3 B a \,b^{2} d -B \,b^{3} c -C \,a^{3} c -3 C \,a^{2} b d +3 C a \,b^{2} c +C \,b^{3} d \right ) a^{2} x}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \left (a^{2}+b^{2}\right )}+\frac {b^{2} \left (A \,a^{3} c +3 A \,a^{2} b d -3 A a \,b^{2} c -A \,b^{3} d -B \,a^{3} d +3 B \,a^{2} b c +3 B a \,b^{2} d -B \,b^{3} c -C \,a^{3} c -3 C \,a^{2} b d +3 C a \,b^{2} c +C \,b^{3} d \right ) x \tan \left (f x +e \right )^{2}}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \left (a^{2}+b^{2}\right )}+\frac {3 A \,a^{3} b^{2} d -5 A \,a^{2} b^{3} c -A \,b^{4} d a -A \,b^{5} c -B \,a^{4} d b +3 B \,a^{3} b^{2} c +3 B \,a^{2} b^{3} d -B \,b^{4} c a -a^{5} C d -C \,a^{4} c b -5 C \,a^{3} b^{2} d +3 C \,a^{2} b^{3} c}{2 f \,b^{2} \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}+\frac {2 b \left (A \,a^{3} c +3 A \,a^{2} b d -3 A a \,b^{2} c -A \,b^{3} d -B \,a^{3} d +3 B \,a^{2} b c +3 B a \,b^{2} d -B \,b^{3} c -C \,a^{3} c -3 C \,a^{2} b d +3 C a \,b^{2} c +C \,b^{3} d \right ) a x \tan \left (f x +e \right )}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \left (a^{2}+b^{2}\right )}}{\left (a +b \tan \left (f x +e \right )\right )^{2}}+\frac {\left (A \,a^{3} d -3 A \,a^{2} b c -3 A a \,b^{2} d +A \,b^{3} c +B \,a^{3} c +3 B \,a^{2} b d -3 B a \,b^{2} c -B \,b^{3} d -a^{3} C d +3 C \,a^{2} b c +3 C a \,b^{2} d -C \,b^{3} c \right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {\left (A \,a^{3} d -3 A \,a^{2} b c -3 A a \,b^{2} d +A \,b^{3} c +B \,a^{3} c +3 B \,a^{2} b d -3 B a \,b^{2} c -B \,b^{3} d -a^{3} C d +3 C \,a^{2} b c +3 C a \,b^{2} d -C \,b^{3} c \right ) \ln \left (a +b \tan \left (f x +e \right )\right )}{f \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}\) | \(884\) |
risch | \(\text {Expression too large to display}\) | \(2383\) |
parallelrisch | \(\text {Expression too large to display}\) | \(2787\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 987 vs. \(2 (316) = 632\).
Time = 0.30 (sec) , antiderivative size = 987, normalized size of antiderivative = 3.08 \[ \int \frac {(c+d \tan (e+f x)) \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx=\frac {2 \, {\left ({\left ({\left (A - C\right )} a^{5} + 3 \, B a^{4} b - 3 \, {\left (A - C\right )} a^{3} b^{2} - B a^{2} b^{3}\right )} c - {\left (B a^{5} - 3 \, {\left (A - C\right )} a^{4} b - 3 \, B a^{3} b^{2} + {\left (A - C\right )} a^{2} b^{3}\right )} d\right )} f x + {\left (2 \, {\left ({\left ({\left (A - C\right )} a^{3} b^{2} + 3 \, B a^{2} b^{3} - 3 \, {\left (A - C\right )} a b^{4} - B b^{5}\right )} c - {\left (B a^{3} b^{2} - 3 \, {\left (A - C\right )} a^{2} b^{3} - 3 \, B a b^{4} + {\left (A - C\right )} b^{5}\right )} d\right )} f x + {\left (C a^{4} b - 3 \, B a^{3} b^{2} + 5 \, {\left (A - C\right )} a^{2} b^{3} + 3 \, B a b^{4} - A b^{5}\right )} c + {\left (C a^{5} + B a^{4} b - {\left (3 \, A - 7 \, C\right )} a^{3} b^{2} - 5 \, B a^{2} b^{3} + 3 \, A a b^{4}\right )} d\right )} \tan \left (f x + e\right )^{2} - {\left (3 \, C a^{4} b - 5 \, B a^{3} b^{2} + {\left (7 \, A - 3 \, C\right )} a^{2} b^{3} + B a b^{4} + A b^{5}\right )} c + {\left (C a^{5} - 3 \, B a^{4} b + 5 \, {\left (A - C\right )} a^{3} b^{2} + 3 \, B a^{2} b^{3} - A a b^{4}\right )} d - {\left ({\left ({\left (B a^{3} b^{2} - 3 \, {\left (A - C\right )} a^{2} b^{3} - 3 \, B a b^{4} + {\left (A - C\right )} b^{5}\right )} c + {\left ({\left (A - C\right )} a^{3} b^{2} + 3 \, B a^{2} b^{3} - 3 \, {\left (A - C\right )} a b^{4} - B b^{5}\right )} d\right )} \tan \left (f x + e\right )^{2} + {\left (B a^{5} - 3 \, {\left (A - C\right )} a^{4} b - 3 \, B a^{3} b^{2} + {\left (A - C\right )} a^{2} b^{3}\right )} c + {\left ({\left (A - C\right )} a^{5} + 3 \, B a^{4} b - 3 \, {\left (A - C\right )} a^{3} b^{2} - B a^{2} b^{3}\right )} d + 2 \, {\left ({\left (B a^{4} b - 3 \, {\left (A - C\right )} a^{3} b^{2} - 3 \, B a^{2} b^{3} + {\left (A - C\right )} a b^{4}\right )} c + {\left ({\left (A - C\right )} a^{4} b + 3 \, B a^{3} b^{2} - 3 \, {\left (A - C\right )} a^{2} b^{3} - B a b^{4}\right )} d\right )} \tan \left (f x + e\right )\right )} \log \left (\frac {b^{2} \tan \left (f x + e\right )^{2} + 2 \, a b \tan \left (f x + e\right ) + a^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) + 2 \, {\left (2 \, {\left ({\left ({\left (A - C\right )} a^{4} b + 3 \, B a^{3} b^{2} - 3 \, {\left (A - C\right )} a^{2} b^{3} - B a b^{4}\right )} c - {\left (B a^{4} b - 3 \, {\left (A - C\right )} a^{3} b^{2} - 3 \, B a^{2} b^{3} + {\left (A - C\right )} a b^{4}\right )} d\right )} f x + {\left (C a^{5} - 2 \, B a^{4} b + 3 \, {\left (A - C\right )} a^{3} b^{2} + 3 \, B a^{2} b^{3} - {\left (3 \, A - 2 \, C\right )} a b^{4} - B b^{5}\right )} c + {\left (B a^{5} - {\left (2 \, A - 3 \, C\right )} a^{4} b - 3 \, B a^{3} b^{2} + 3 \, {\left (A - C\right )} a^{2} b^{3} + 2 \, B a b^{4} - A b^{5}\right )} d\right )} \tan \left (f x + e\right )}{2 \, {\left ({\left (a^{6} b^{2} + 3 \, a^{4} b^{4} + 3 \, a^{2} b^{6} + b^{8}\right )} f \tan \left (f x + e\right )^{2} + 2 \, {\left (a^{7} b + 3 \, a^{5} b^{3} + 3 \, a^{3} b^{5} + a b^{7}\right )} f \tan \left (f x + e\right ) + {\left (a^{8} + 3 \, a^{6} b^{2} + 3 \, a^{4} b^{4} + a^{2} b^{6}\right )} f\right )}} \]
[In]
[Out]
Exception generated. \[ \int \frac {(c+d \tan (e+f x)) \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx=\text {Exception raised: AttributeError} \]
[In]
[Out]
none
Time = 0.42 (sec) , antiderivative size = 574, normalized size of antiderivative = 1.79 \[ \int \frac {(c+d \tan (e+f x)) \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx=\frac {\frac {2 \, {\left ({\left ({\left (A - C\right )} a^{3} + 3 \, B a^{2} b - 3 \, {\left (A - C\right )} a b^{2} - B b^{3}\right )} c - {\left (B a^{3} - 3 \, {\left (A - C\right )} a^{2} b - 3 \, B a b^{2} + {\left (A - C\right )} b^{3}\right )} d\right )} {\left (f x + e\right )}}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} - \frac {2 \, {\left ({\left (B a^{3} - 3 \, {\left (A - C\right )} a^{2} b - 3 \, B a b^{2} + {\left (A - C\right )} b^{3}\right )} c + {\left ({\left (A - C\right )} a^{3} + 3 \, B a^{2} b - 3 \, {\left (A - C\right )} a b^{2} - B b^{3}\right )} d\right )} \log \left (b \tan \left (f x + e\right ) + a\right )}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} + \frac {{\left ({\left (B a^{3} - 3 \, {\left (A - C\right )} a^{2} b - 3 \, B a b^{2} + {\left (A - C\right )} b^{3}\right )} c + {\left ({\left (A - C\right )} a^{3} + 3 \, B a^{2} b - 3 \, {\left (A - C\right )} a b^{2} - B b^{3}\right )} d\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} - \frac {{\left (C a^{4} b - 3 \, B a^{3} b^{2} + {\left (5 \, A - 3 \, C\right )} a^{2} b^{3} + B a b^{4} + A b^{5}\right )} c + {\left (C a^{5} + B a^{4} b - {\left (3 \, A - 5 \, C\right )} a^{3} b^{2} - 3 \, B a^{2} b^{3} + A a b^{4}\right )} d - 2 \, {\left ({\left (B a^{2} b^{3} - 2 \, {\left (A - C\right )} a b^{4} - B b^{5}\right )} c - {\left (C a^{4} b - {\left (A - 3 \, C\right )} a^{2} b^{3} - 2 \, B a b^{4} + A b^{5}\right )} d\right )} \tan \left (f x + e\right )}{a^{6} b^{2} + 2 \, a^{4} b^{4} + a^{2} b^{6} + {\left (a^{4} b^{4} + 2 \, a^{2} b^{6} + b^{8}\right )} \tan \left (f x + e\right )^{2} + 2 \, {\left (a^{5} b^{3} + 2 \, a^{3} b^{5} + a b^{7}\right )} \tan \left (f x + e\right )}}{2 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 1006 vs. \(2 (316) = 632\).
Time = 0.81 (sec) , antiderivative size = 1006, normalized size of antiderivative = 3.14 \[ \int \frac {(c+d \tan (e+f x)) \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx=\frac {\frac {2 \, {\left (A a^{3} c - C a^{3} c + 3 \, B a^{2} b c - 3 \, A a b^{2} c + 3 \, C a b^{2} c - B b^{3} c - B a^{3} d + 3 \, A a^{2} b d - 3 \, C a^{2} b d + 3 \, B a b^{2} d - A b^{3} d + C b^{3} d\right )} {\left (f x + e\right )}}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} + \frac {{\left (B a^{3} c - 3 \, A a^{2} b c + 3 \, C a^{2} b c - 3 \, B a b^{2} c + A b^{3} c - C b^{3} c + A a^{3} d - C a^{3} d + 3 \, B a^{2} b d - 3 \, A a b^{2} d + 3 \, C a b^{2} d - B b^{3} d\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} - \frac {2 \, {\left (B a^{3} b c - 3 \, A a^{2} b^{2} c + 3 \, C a^{2} b^{2} c - 3 \, B a b^{3} c + A b^{4} c - C b^{4} c + A a^{3} b d - C a^{3} b d + 3 \, B a^{2} b^{2} d - 3 \, A a b^{3} d + 3 \, C a b^{3} d - B b^{4} d\right )} \log \left ({\left | b \tan \left (f x + e\right ) + a \right |}\right )}{a^{6} b + 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} + b^{7}} + \frac {3 \, B a^{3} b^{4} c \tan \left (f x + e\right )^{2} - 9 \, A a^{2} b^{5} c \tan \left (f x + e\right )^{2} + 9 \, C a^{2} b^{5} c \tan \left (f x + e\right )^{2} - 9 \, B a b^{6} c \tan \left (f x + e\right )^{2} + 3 \, A b^{7} c \tan \left (f x + e\right )^{2} - 3 \, C b^{7} c \tan \left (f x + e\right )^{2} + 3 \, A a^{3} b^{4} d \tan \left (f x + e\right )^{2} - 3 \, C a^{3} b^{4} d \tan \left (f x + e\right )^{2} + 9 \, B a^{2} b^{5} d \tan \left (f x + e\right )^{2} - 9 \, A a b^{6} d \tan \left (f x + e\right )^{2} + 9 \, C a b^{6} d \tan \left (f x + e\right )^{2} - 3 \, B b^{7} d \tan \left (f x + e\right )^{2} + 8 \, B a^{4} b^{3} c \tan \left (f x + e\right ) - 22 \, A a^{3} b^{4} c \tan \left (f x + e\right ) + 22 \, C a^{3} b^{4} c \tan \left (f x + e\right ) - 18 \, B a^{2} b^{5} c \tan \left (f x + e\right ) + 2 \, A a b^{6} c \tan \left (f x + e\right ) - 2 \, C a b^{6} c \tan \left (f x + e\right ) - 2 \, B b^{7} c \tan \left (f x + e\right ) - 2 \, C a^{6} b d \tan \left (f x + e\right ) + 8 \, A a^{4} b^{3} d \tan \left (f x + e\right ) - 14 \, C a^{4} b^{3} d \tan \left (f x + e\right ) + 22 \, B a^{3} b^{4} d \tan \left (f x + e\right ) - 18 \, A a^{2} b^{5} d \tan \left (f x + e\right ) + 12 \, C a^{2} b^{5} d \tan \left (f x + e\right ) - 2 \, B a b^{6} d \tan \left (f x + e\right ) - 2 \, A b^{7} d \tan \left (f x + e\right ) - C a^{6} b c + 6 \, B a^{5} b^{2} c - 14 \, A a^{4} b^{3} c + 11 \, C a^{4} b^{3} c - 7 \, B a^{3} b^{4} c - 3 \, A a^{2} b^{5} c - B a b^{6} c - A b^{7} c - C a^{7} d - B a^{6} b d + 6 \, A a^{5} b^{2} d - 9 \, C a^{5} b^{2} d + 11 \, B a^{4} b^{3} d - 7 \, A a^{3} b^{4} d + 4 \, C a^{3} b^{4} d - A a b^{6} d}{{\left (a^{6} b^{2} + 3 \, a^{4} b^{4} + 3 \, a^{2} b^{6} + b^{8}\right )} {\left (b \tan \left (f x + e\right ) + a\right )}^{2}}}{2 \, f} \]
[In]
[Out]
Time = 15.53 (sec) , antiderivative size = 502, normalized size of antiderivative = 1.57 \[ \int \frac {(c+d \tan (e+f x)) \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx=-\frac {\frac {A\,b^5\,c+C\,a^5\,d+A\,a\,b^4\,d+B\,a\,b^4\,c+B\,a^4\,b\,d+C\,a^4\,b\,c+5\,A\,a^2\,b^3\,c-3\,A\,a^3\,b^2\,d-3\,B\,a^3\,b^2\,c-3\,B\,a^2\,b^3\,d-3\,C\,a^2\,b^3\,c+5\,C\,a^3\,b^2\,d}{2\,b^2\,\left (a^4+2\,a^2\,b^2+b^4\right )}+\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (A\,b^4\,d+B\,b^4\,c+C\,a^4\,d+2\,A\,a\,b^3\,c-2\,B\,a\,b^3\,d-2\,C\,a\,b^3\,c-A\,a^2\,b^2\,d-B\,a^2\,b^2\,c+3\,C\,a^2\,b^2\,d\right )}{b\,\left (a^4+2\,a^2\,b^2+b^4\right )}}{f\,\left (a^2+2\,a\,b\,\mathrm {tan}\left (e+f\,x\right )+b^2\,{\mathrm {tan}\left (e+f\,x\right )}^2\right )}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,\left (B\,d+A\,d\,1{}\mathrm {i}+B\,c\,1{}\mathrm {i}-A\,c+C\,c-C\,d\,1{}\mathrm {i}\right )}{2\,f\,\left (-a^3\,1{}\mathrm {i}-3\,a^2\,b+a\,b^2\,3{}\mathrm {i}+b^3\right )}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,\left (A\,d+B\,c-C\,d-A\,c\,1{}\mathrm {i}+B\,d\,1{}\mathrm {i}+C\,c\,1{}\mathrm {i}\right )}{2\,f\,\left (-a^3-a^2\,b\,3{}\mathrm {i}+3\,a\,b^2+b^3\,1{}\mathrm {i}\right )}-\frac {\ln \left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )\,\left (\left (A\,d+B\,c-C\,d\right )\,a^3+\left (3\,B\,d-3\,A\,c+3\,C\,c\right )\,a^2\,b+\left (3\,C\,d-3\,B\,c-3\,A\,d\right )\,a\,b^2+\left (A\,c-B\,d-C\,c\right )\,b^3\right )}{f\,\left (a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6\right )} \]
[In]
[Out]